package com.hongyue.ziXI;

import java.util.HashMap;

public class Demo01 {
    public static void main(String[] args) {
        String a = "awrgcyshrtrsfdtqe4rfdgdtdrhddawdczxvaedqcaczsdqwe";
        HashMap<Character, Integer> map = new HashMap<>();
        for (int i = 0; i < a.length(); i++) {
            char c = a.charAt(i);
            if (map.containsKey(c)) {
                Integer in = map.get(c);
                in++;
                map.put(c, in);
            } else {
                map.put(c, 1);
            }

        }
        System.out.println(map);
    }
}
